<script>
	$(document).on("pageshow","#questions",function(){
		setMessage("profile.back.to.profile",".back_to_profile");
		setMessage("questions.make.a.question",".question-make-a-question");
		setMessage("question.new.question",".new_question_button");
		setMessage("question.question.title",".question_detail_title");
		setMessage("general.close",".questionDetail_close");
		
		setMessage("question.detail.answer",".question_detail_answer");
		setMessage("question.anwer.question",".new_answer_button");
		
		setMessage("general.delete",".question_detail_delete");
		
		loadProfileQuestions('<?php echo $maskerName; ?>');
	});
</script>
<div data-role="content" data-scroll="true">
	<div data-form="ui-body-a" class="ui-body-a">
		<a href="#" onclick="javascript:window.location.href='home.php#profile?masker=' + maskerName" data-transition="slide" class="back_to_profile ui-btn ui-shadow"></a>
		<div class="profile_header">
			<div class="profile_name"></div>
		</div>
		<div class="new-question-box" style="display:none">
			<div class="question-make-a-question"></div>
			<textarea id="new-question" class="new-question" onkeyup="countQuestionCharacters(this)"></textarea>
			<div style="margin:5px;font-size:18px;color:grey" class="questionCharacters">500</div>
			<a href="#" onclick="insertQuestion(maskerName,'<?php echo $maskerId; ?>','<?php echo $maskerName; ?>',null,'#new-question')" data-transition="slide" class="new_question_button ui-btn ui-shadow"></a>
		</div>
		<ul id="thelist" class="questions-ul"></ul>
		
	</div>
</div>

<div data-role="popup" id="questionDetail" class="questionDetail" data-theme="b">
	<ul data-role="listview" data-inset="true" style="min-width:210px;max-width: 800px">
	<li class="question_detail_title" data-role="list-divider"></li>
	<div class="question_detail_answer_box" style="display: none">
		<textarea id="new-question-answer" class="new-question-answer" onkeyup="countQuestionCharacters(this)"></textarea>
		<div style="margin:5px;font-size:18px;color:grey" class="questionCharacters">500</div>
		<a href="#" onclick="updateQuestionAnswer(maskerName, '<?php echo $maskerId; ?>', '#new-question-answer')" data-transition="slide" class="new_answer_button ui-btn ui-shadow ui-corner-all ui-btn-a ui-mini"></a>
	</div>
	
	<li data-icon="false"><a href="#" onclick="openAnswerDiv()"><div class="_icon reply_icon" style="float:left"></div><div class="question_detail_answer li_popup_question" style="float:left"></div></a></li>
	<li data-icon="false"><a href="#" onclick="deleteQuestion(maskerName, '<?php echo $maskerId; ?>', this)"><div class="_icon cancel_icon" style="float:left"></div><div class="question_detail_delete li_popup_question" style="float:left"></div></a></li>
    <li data-icon="false"><a href="#" onclick="closeQuestionDetail()"><div class="questionDetail_close" style="float:left"></div></a></li>
 	</ul> 
</div>